import axios from 'axiosInstance';

// 封装 GET 请求
const getRequest = (url, params = {}) => {
  return axios.get(url, { params });
};

// 封装 POST 请求
const postRequest = (url, data = {}) => {
  return axios.post(url, data);
};

// 获取订单列表
export const getOrderList = () => {
  return getRequest('/orders');
};

// 创建订单
export const createOrder = (orderData) => {
  return postRequest('/orders', orderData);
};
